const mongoose = require('mongoose');

mongoose.connect('mongodb://localhost/users',{useUnifiedTopology: true,useNewUrlParser: true})
  .then(()=> console.log('链接成功'))
  .catch(err => console.log(err,'链接失败'))

const UserSchema = new mongoose.Schema({
  site: [Object],
  User: [Object]
});

const User = mongoose.model('User',UserSchema);


// User.findOneAndDelete({_id: '60014b266b32361b7f21c4c3'}).then(result => console.log(result))
User.deleteMany({}).then(result => console.log(result))
